package code

import (
	v1 "ginweb-admin/api/v1"
	"github.com/gin-gonic/gin"
)

type CodeRouter struct{}

func (router *CodeRouter) InitCodeRouter(Router *gin.RouterGroup) {
	// 获取验证码的api
	codeApi := v1.WebApiGroupApp.Code.CodeApi
	// 创建路由组
	codeApiGroup := Router.Group("/code")
	{
		// 生成验证码
		codeApiGroup.GET("/getCode", codeApi.CreateCode)
		// 校验验证码
		codeApiGroup.GET("/verify", codeApi.VerifyCode)
	}
}
